package net.aiion.weave.spi.bytecode.events;

import net.aiion.weave.spi.bytecode.BytecodeVisitor;

public interface BytecodeEvent
{
    int CLASS_START = 0;

    int SOURCE = 1;

    int OUTER_CLASS = 2;

    int ANNOTATION_START = 3;
    int ANNOTATION_VALUE = 4;
    int ANNOTATION_ENUM_VALUE = 5;
    int ANNOTATION_ANNOTATION_VALUE = 6;
    int ANNOTATION_ARRAY_VALUE = 7;
    int ANNOTATION_END = 8;

    int ATTRIBUTE = 9;

    int INNER_CLASS = 10;

    int FIELD_START = 11;
    int FIELD_END = 12;

    int METHOD_START = 13;

    int ANNOTATION_DEFAULT_START = 14;
    int PARAMETER_ANNOTATION_START = 15;

    int CODE_START = 16;
    int FRAME = 17;
    int LABEL = 18;
    int LINE_NUMBER = 19;
    int LOAD_CONSTANT_INSTRUCTION = 20;
    int LOCAL_VARIABLE = 21;
    int TABLE_SWITCH_INSTRUCTION = 22;
    int LOOKUP_SWITCH_INSTRUCTION = 23;
    int INSTRUCTION = 24;
    int INT_INSTRUCTION = 25;
    int IINC_INSTRUCTION = 26;
    int MULTI_A_NEW_ARRAY_INSTRUCTION = 27;
    int JUMP_INSTRUCTION = 28;
    int TRY_CATCH_BLOCK = 29;
    int TYPE_INSTRUCTION = 30;
    int FIELD_INSTRUCTION = 31;
    int METHOD_INSTRUCTION = 32;
    int VARIABLE_INSTRUCTION = 33;
    int INVOKE_DYNAMIC_INSTRUCTION = 34;
    int CODE_END = 35;

    int METHOD_END = 36;

    int CLASS_END = 37;

    int getType();

    BytecodeVisitor acceptBytecodeVisitor(BytecodeVisitor aBytecodeVisitor);

    ClassStartBytecodeEvent asClassStart();

    AnnotationStartBytecodeEvent asAnnotationStart();

    AnnotationValueBytecodeEvent asAnnotationValue();

    AnnotationEnumValueBytecodeEvent asAnnotationEnumValue();

    AnnotationEndBytecodeEvent asAnnotationEnd();

    FieldStartBytecodeEvent asFieldStart();

    FieldEndBytecodeEvent asFieldEnd();

    MethodStartBytecodeEvent asMethodStart();

    CodeStartBytecodeEvent asCodeStart();

    InstructionBytecodeEvent asInstruction();

    CodeEndBytecodeEvent asCodeEnd();

    MethodEndBytecodeEvent asMethodEnd();

    ClassEndBytecodeEvent asClassEnd();
}
